#ifndef _GUI_H
#define _GUI_H

#define UIFILE DATADIR PATHSEP "penpresenter.ui"

#include <gtk/gtk.h>
#include <cv.h>
#include <unistd.h>

typedef struct {
	GtkBuilder *builder;
	GtkWindow *janela;
	Imagem *img;
	CvPoint calib_topleft;
	CvPoint calib_bottomright;
	guint idtimeout;
	long int porta;
	short int etapa_calibracao;
	short int execucao;
	pid_t pid;
} GUI;

int GUIIniciar(int *argc, char **argv[], Imagem *img);
void GUIExibir();
gboolean GUIObterFrame();
void GUICalibrar(GtkWidget *widget, gpointer data);
gboolean GUIObterCoordenadas(GtkWidget *eventbox, GdkEventButton *event, gpointer data);
void GUIAbrirOO(GtkWidget *widget, gpointer data);
void GUIConectarOO(GtkWidget *widget, gpointer data);
void GUIExibirAjuda(GtkWidget *widget, gpointer data);
void GUIExibirSobre(GtkWidget *widget, gpointer data);
void GUISair(GtkWidget *widget, gpointer data);

#endif
